<!DOCTYPE html>
<html>
<head>
<style>
  #editable { font-size: 8px; }
</style>
<script>
function runTest() {
  const editable = document.getElementById("editable");
  getSelection().selectAllChildren(editable);
  if (window.internals) {
    const range = document.createRange();
    range.setStart(editable.firstChild, 0);
    range.setEnd(editable.firstChild, 8);
    internals.setMarker(document, range, 'spelling');
  }
}
</script>
</head>
<body onload="runTest();">
  <div id="editable" contenteditable="true">wellcome should be marked</div>
</body>
</html>
